package com.usefullc.user.service.component;


import com.usefullc.user.vo.UserVo;

/**
 *
 * @Description: 用户管理
 *
 *
 **/
public class UserManager {

    private static ThreadLocal<UserVo> userThreadLocal = new ThreadLocal<>();

    public static UserVo getLoginUser() {
        return userThreadLocal.get();
    }

    public static void setLoginUser(UserVo user) {
        userThreadLocal.set(user);
    }

    public static void clean() {
        userThreadLocal.remove();
    }
}
